package com.docker.chy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.docker.chy.mapper.DoctorFamilyMapper;
import com.docker.chy.domain.DoctorFamily;
import com.docker.chy.service.IDoctorFamilyService;

/**
 * 患者家庭关系Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-09
 */
@Service
public class DoctorFamilyServiceImpl implements IDoctorFamilyService 
{
    @Autowired
    private DoctorFamilyMapper doctorFamilyMapper;

    /**
     * 查询患者家庭关系
     * 
     * @param id 患者家庭关系主键
     * @return 患者家庭关系
     */
    @Override
    public DoctorFamily selectDoctorFamilyById(Long id)
    {
        return doctorFamilyMapper.selectDoctorFamilyById(id);
    }

    /**
     * 查询患者家庭关系列表
     * 
     * @param doctorFamily 患者家庭关系
     * @return 患者家庭关系
     */
    @Override
    public List<DoctorFamily> selectDoctorFamilyList(DoctorFamily doctorFamily)
    {
        return doctorFamilyMapper.selectDoctorFamilyList(doctorFamily);
    }

    /**
     * 新增患者家庭关系
     * 
     * @param doctorFamily 患者家庭关系
     * @return 结果
     */
    @Override
    public int insertDoctorFamily(DoctorFamily doctorFamily)
    {
        return doctorFamilyMapper.insertDoctorFamily(doctorFamily);
    }

    /**
     * 修改患者家庭关系
     * 
     * @param doctorFamily 患者家庭关系
     * @return 结果
     */
    @Override
    public int updateDoctorFamily(DoctorFamily doctorFamily)
    {
        return doctorFamilyMapper.updateDoctorFamily(doctorFamily);
    }

    /**
     * 批量删除患者家庭关系
     * 
     * @param ids 需要删除的患者家庭关系主键
     * @return 结果
     */
    @Override
    public int deleteDoctorFamilyByIds(Long[] ids)
    {
        return doctorFamilyMapper.deleteDoctorFamilyByIds(ids);
    }

    /**
     * 删除患者家庭关系信息
     * 
     * @param id 患者家庭关系主键
     * @return 结果
     */
    @Override
    public int deleteDoctorFamilyById(Long id)
    {
        return doctorFamilyMapper.deleteDoctorFamilyById(id);
    }
}
